package collection;

public class generic2 {

    public static void main(String[] args) {
        II1 ii1 = new II1();
        System.out.println(ii1.SetGet("hh"));

        Ii2<Integer> ii2 = new Ii2<>();
        System.out.println(ii2.SetGet(12));
    }
}

interface GI1<T>{
    T SetGet(T t);
}

//实现类不是泛型
class II1 implements GI1<String>{
    @Override
    public String SetGet(String s) {
        return s;
    }
}

//实现类是泛型
class Ii2<T> implements GI1<T>{
    @Override
    public T SetGet(T t) {
        return null;
    }
}
